<script setup>
import { useStore } from "vuex";



let store = useStore();
let userInfo = JSON.parse(localStorage.getItem("userInfo"));
// 如果本地存储里面有用户信息才存入
if (userInfo) {
  store.commit("user/userInfoMut", userInfo);
  store.dispatch("cart/cartInitAct", userInfo);
}

let list = localStorage.getItem("addressList");
if (list) {
  store.commit("address/addressInitMut", JSON.parse(list));
}
</script>

<template>
  <div>
    <router-view></router-view>
    
  </div>
</template>

<style scoped></style>
